using Avalonia;
using Avalonia.Controls;
using Avalonia.Media;

namespace WeChat.Controls;

public sealed class ChatNavigationItem : ContentControl
{
    /// <summary>
    /// 免打扰
    /// </summary>
    public static readonly StyledProperty<bool> IsDisturbProperty = AvaloniaProperty
        .Register<ChatNavigationItem,
            bool>(
            nameof(Photo));

    /// <summary>
    /// 免打扰
    /// </summary>
    public bool IsDisturb
    {
        get => GetValue(IsDisturbProperty);
        set => SetValue(IsDisturbProperty, value);
    }
        
    /// <summary>
    /// 头像
    /// </summary>
    public static readonly StyledProperty<IImage> PhotoProperty = AvaloniaProperty
        .Register<ChatNavigationItem,
            IImage>(
            nameof(Photo));

    /// <summary>
    /// 头像
    /// </summary>
    public IImage Photo
    {
        get => GetValue(PhotoProperty);
        set => SetValue(PhotoProperty, value);
    }
    
    /// <summary>
    /// 名称
    /// </summary>
    public static readonly StyledProperty<string> UsernameProperty = AvaloniaProperty
        .Register<ChatNavigationItem,
            string>(
            nameof(Username));

    /// <summary>
    /// 名称
    /// </summary>
    public string Username
    {
        get => GetValue(UsernameProperty);
        set => SetValue(UsernameProperty, value);
    }
}